package demo02.controller;

import demo02.entity.User;
import demo02.mapper.UserMapper;
import demo02.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author RDSunday
 * @create 2020-08-21 10:18
 **/
@RestController
    @RequestMapping("/testboot")
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping("/findAll")
    public List<User> getUserMapper() {
        List<User> users = userService.selectAllUserService();

        return users;
    }
}

